package com.nineclock.sign.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nineclock.sign.pojo.SignInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface SignInfoMapper extends BaseMapper<SignInfo> {
    /**
     * 查询签到记录列表
     *
     * @param date 查询的时间
     * @param id   员工id
     * @return 返回结果
     */
    @Select("select COUNT(create_date) FROM sign_info where create_date=#{date} and company_user_id = #{id}")
    Integer countGroup(@Param("date") String date, @Param("id") Long id);
}
